<template>
  <div>
    <van-nav-bar title="查看疾病信息" left-text="返回" left-arrow @click-left="onClickLeft" />
    <div class="incontent">
      <div class="content-boxbanner">
        <div class="title">
          <van-icon class="icon-tijianbiao iconfont" class-prefix="icon" name="icon-tijianbiao" />
          <p>{{diseaseInfocontent.name}}</p>
        </div>
        <div class="item">
          <div>病症描述：</div>
          <p class="iscolor">{{diseaseInfocontent.intro}}</p>
        </div>
        <div class="item">俗称：{{diseaseInfocontent.alias}}</div>
        <div class="item">发病部位：{{diseaseInfocontent.siteOfDisease}}</div>
        <div class="item">应挂科室：{{diseaseInfocontent.register}}</div>
        <div class="item">传染性：{{diseaseInfocontent.infectiousness}}</div>
        <div class="item">治疗方式：{{diseaseInfocontent.treatment}}</div>
        <div class="item">治疗时间：{{diseaseInfocontent.treatmentCycle}}</div>
        <div class="item">多发人群：{{diseaseInfocontent.multiplePopulation}}</div>
        <div class="item">治疗费用预计：{{diseaseInfocontent.charge || "暂无"}}</div>
        <div class="item">治愈率:<span class="fss">{{diseaseInfocontent.cureRate}}</span></div>
        <div class="item">典型症状:{{diseaseInfocontent.typicalSymptom}}</div>
        <div class="item">并发症:{{diseaseInfocontent.complication}}</div>
        <div class="item">常用药品:{{diseaseInfocontent.medicine}}</div>
        <div class="item">相关检查:<span class="iscolor">{{diseaseInfocontent.check}}</span></div>
      </div>
      <div style="height: 3rem;"></div>
    </div>
  </div>
</template>
<script>
import { Icon } from "vant";
export default {
  components: {
    [Icon.name]: Icon
  },
  data() {
    return {
      diseaseInfocontent: {}
    };
  },
  created(){
      this.$store.state.showBottomNav = false;
  },
  mounted() {
    let code = this.$route.query.code;
    this.queryDiseaseInfo(code);
  },
  methods: {
    onClickLeft() {
      //点击返回
      this.$router.go(-1);
      this.$store.state.showBottomNav = true;
    },
    async queryDiseaseInfo(code) {
      //根据banner传过来的参数进行查询对应症状
      let res = await this.$axios.post("/api/common/disease/queryDiseaseInfo", {
        apiKey: "Ib3I1727eb283024b369d60868c8f7b3a719354fd552991",
        diseaseID: code
      });
      if (res.statusCode == "000000") {
        this.diseaseInfocontent = res.result;
      }
    }
  }
};
</script>
<style scoped lang="less">
*{
    margin: 0;
    padding: 0;
}
.content-boxbanner {
  font-size: 15px;
  color: #333;
  padding: 10px 12px;
  .title {
      display: flex;
      justify-content: space-around;
      align-items: center;
      
      p{
          display: inline-block;
          font-size: 16px;
          font-weight: bold;
      }
  }
  .item{
      line-height: 32px;
      .fss{
          color: #ff0000;
      }
  }
}
.iscolor{
    color: #999999;
}
.icon-tijianbiao {
  font-size: 40px;
  color: #9fd8f9;
  padding-right: 20px;
}
/deep/ .van-nav-bar__content {
  background-color: #0d9df0;
}
/deep/ .van-nav-bar .van-icon {
  color: #ffffff;
}
/deep/ .van-nav-bar__text {
  color: #ffffff;
}
/deep/ .van-nav-bar__title {
  color: #ffffff;
}
</style>